package methodRef;

import java.util.function.BiPredicate;
import java.util.function.Supplier;

/**
 * 〈〉
 *
 * @author coach tam
 * @email 327395128@qq.com
 * @create 2023/10/17
 * @since 1.0.0
 * 〈坚持灵活 灵活坚持〉
 */
public class FunctionInterfaceTest {
    public static void main(String[] args) {
        //接收两个输入参数，返回一个boolean
        BiPredicate<Integer, Integer> biPredicate = (num1, num2) -> num1 > num2;
        System.out.println(biPredicate.test(1, 2));

        //Supplier 不接收参数，返回一个数据
        Supplier<Double> supplier = () -> Math.random();
        System.out.println(supplier.get());
        System.out.println(supplier.get());


    }
}
